home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-23 | 7.3 KB | 247 lines | [TEXT/MPS ] |
- /*
- File: Orbits.r
-
- Contains: A set of templates to display (and calculate) the orbits of the planets.
-
- Written by: Harry Chesley
-
- Copyright: © 1992 by Apple Computer, Inc.
-
- Change History (most recent first):
-
- 5/13/92 hrc created
-
- To Do:
- */
-
- #include "Types.r"
- #include "OCE.r"
- #include "Planet.h"
-
- include "Planet.rsrc" not 'ckid';
-
- #define kPlanetAttributeType "hrc Planet"
-
- #define kPlanetMainAspect 10000
- #define kPlanetFrontPage 11000
- #define kPlanetParamsPage 12000
-
- // Planet page size:
-
- #define kPlanetPageHeight (kDETSubpageIconBottom+112)
- #define kPlanetPageWidth 218
-
- #define kPalatino 16
-
- #define kFirstColLeft 8
- #define kFirstColRight 75
- #define kSecondColLeft 75
- #define kSecondColRight (kPlanetPageWidth-12)
-
-
- resource 'deta' (kPlanetMainAspect, purgeable) {
- 0, // Priority (unused)
- dropCheckConflicts, // Drop check flag
- isMainAspect // Is the main aspect
- };
-
- resource 'rstr' (kPlanetMainAspect+kDETTemplateName, purgeable) {
- "hrc Planet main aspect"
- };
-
- resource 'rstr' (kPlanetMainAspect+kDETAttributeType, purgeable) {
- kPlanetAttributeType
- };
-
- resource 'detn' (kPlanetMainAspect+kDETAttributeValueTag, purgeable) {
- 'plnt'
- };
-
- resource 'rstr' (kPlanetMainAspect+kDETAspectKind, purgeable) {
- "Planet"
- };
-
- resource 'rstr' (kPlanetMainAspect+kDETAspectWhatIs, purgeable) {
- "Planet\n\This is a body that orbits a sun."
- };
-
- resource 'rst#' (kPlanetMainAspect+kDETAspectCategory, purgeable) {
- { "Celestial" }
- };
-
- resource 'rstr' (kPlanetMainAspect+kDETAspectNewMenuName, purgeable) {
- "Planet"
- };
-
- #define extendedZero longInt = 0; longInt = 0; integer = 0
-
- type 'detb' (kPlanetMainAspect+kDETAspectNewValue) {
- longInt;
- rstring;
- extendedZero; // Tp
- extendedZero; // epsilon
- extendedZero; // omega bar
- extendedZero; // e
- extendedZero; // a
- };
-
- resource 'detb' (kPlanetMainAspect+kDETAspectNewValue, purgeable) {
- 'plnt',
- "untitled planet"
- };
-
- // attributes to lookup
- resource 'dett' (kPlanetMainAspect+kDETAspectLookup, purgeable)
- {{
- { kPlanetAttributeType }, 'plnt', useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef,
- {
- 'rstr', kDETAspectName, 0;
- 'btyp', kDETNoProperty, kExtendedPropertyType;
- 'blok', kTpProperty, kExtendedPropertyTypeSize;
- 'blok', kEpsilonProperty, kExtendedPropertyTypeSize;
- 'blok', kOmegaBarProperty, kExtendedPropertyTypeSize;
- 'blok', keProperty, kExtendedPropertyTypeSize;
- 'blok', kaProperty, kExtendedPropertyTypeSize;
- };
- }};
-
- data 'detb' (kPlanetMainAspect+kTimeProperty, purgeable)
- { $"0000 0000 0000 0000" };
-
- data 'detb' (kPlanetMainAspect+kXProperty, purgeable)
- { $"0000 0000 0000 0000 0000" };
-
- data 'detb' (kPlanetMainAspect+kYProperty, purgeable)
- { $"0000 0000 0000 0000 0000" };
-
- resource 'rst#' (kPlanetMainAspect+kDETAspectBalloons, purgeable)
- {{
- "The planet's name.", "The planet's name. Cannot be edited because the user record is locked or you do not have privileges to make changes here.",
- }};
-
- resource 'detw' (kPlanetMainAspect+kDETAspectInfoPageCustomWindow, purgeable)
- {
- {0,0,kPlanetPageHeight,kPlanetPageWidth},
- includePopup
- };
-
- resource 'deti' (kPlanetFrontPage, purgeable) {
- 1000,
- kDETNoSublistRect,
- noSelectFirstText,
- {
- kDETNoProperty, kDETNoProperty, kPlanetFrontPage;
- },
- {
- }};
-
- resource 'rstr' (kPlanetFrontPage+kDETTemplateName, purgeable) {
- "hrc Front page"
- };
-
- resource 'rstr' (kPlanetFrontPage+kDETAttributeType, purgeable) {
- kPlanetAttributeType
- };
-
- resource 'detn' (kPlanetFrontPage+kDETAttributeValueTag, purgeable) {
- 'plnt'
- };
-
- resource 'rstr' (kPlanetFrontPage+kDETInfoPageName, purgeable) {
- "Orbit Calculation"
- };
-
- resource 'rstr' (kPlanetFrontPage+kDETInfoPageMainViewAspect, purgeable) {
- "hrc Planet main aspect"
- };
-
- // subPage view
-
- resource 'detv' (kPlanetFrontPage, purgeable)
- {
- {
- kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap,
- Bitmap { kDETLargeIcon };
-
- {kDETSubpageIconBottom+10, kFirstColLeft, kDETSubpageIconBottom+24, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "Time" };
- {kDETSubpageIconBottom+6, kSecondColLeft, kDETSubpageIconBottom+24, kSecondColRight}, kDETEnabled, kTimeProperty,
- EditText { kPalatino, 12, kDETLeft, kDETNormal };
-
- {kDETSubpageIconBottom+50, kFirstColLeft, kDETSubpageIconBottom+64, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "X (meters)" };
- {kDETSubpageIconBottom+48, kSecondColLeft, kDETSubpageIconBottom+64, kSecondColRight}, kDETNoFlags, kXProperty,
- StaticText { kPalatino, 12, kDETLeft, kDETNormal };
-
- {kDETSubpageIconBottom+70, kFirstColLeft, kDETSubpageIconBottom+84, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "Y (meters)" };
- {kDETSubpageIconBottom+68, kSecondColLeft, kDETSubpageIconBottom+84, kSecondColRight}, kDETNoFlags, kYProperty,
- StaticText { kPalatino, 12, kDETLeft, kDETNormal };
- };
- };
-
- resource 'deti' (kPlanetParamsPage, purgeable) {
- 2000,
- kDETNoSublistRect,
- noSelectFirstText,
- {
- kDETNoProperty, kDETNoProperty, kPlanetParamsPage;
- },
- {
- }};
-
- resource 'rstr' (kPlanetParamsPage+kDETTemplateName, purgeable) {
- "hrc Params page"
- };
-
- resource 'rstr' (kPlanetParamsPage+kDETAttributeType, purgeable) {
- kPlanetAttributeType
- };
-
- resource 'detn' (kPlanetParamsPage+kDETAttributeValueTag, purgeable) {
- 'plnt'
- };
-
- resource 'rstr' (kPlanetParamsPage+kDETInfoPageName, purgeable) {
- "Orbit Parameters"
- };
-
- resource 'rstr' (kPlanetParamsPage+kDETInfoPageMainViewAspect, purgeable) {
- "hrc Planet main aspect"
- };
-
- // subPage view
-
- resource 'detv' (kPlanetParamsPage, purgeable)
- {
- {
- kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap,
- Bitmap { kDETLargeIcon };
-
- {kDETSubpageIconBottom+10, kFirstColLeft, kDETSubpageIconBottom+24, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "Tp" };
- {kDETSubpageIconBottom+6, kSecondColLeft, kDETSubpageIconBottom+24, kSecondColRight}, kDETEnabled, kTpProperty,
- EditText { kPalatino, 12, kDETLeft, kDETNormal };
-
- {kDETSubpageIconBottom+30, kFirstColLeft, kDETSubpageIconBottom+44, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "Epsilon" };
- {kDETSubpageIconBottom+26, kSecondColLeft, kDETSubpageIconBottom+44, kSecondColRight}, kDETEnabled, kEpsilonProperty,
- EditText { kPalatino, 12, kDETLeft, kDETNormal };
-
- {kDETSubpageIconBottom+50, kFirstColLeft, kDETSubpageIconBottom+64, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "Omega bar" };
- {kDETSubpageIconBottom+46, kSecondColLeft, kDETSubpageIconBottom+64, kSecondColRight}, kDETEnabled, kOmegaBarProperty,
- EditText { kPalatino, 12, kDETLeft, kDETNormal };
-
- {kDETSubpageIconBottom+70, kFirstColLeft, kDETSubpageIconBottom+84, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "e" };
- {kDETSubpageIconBottom+66, kSecondColLeft, kDETSubpageIconBottom+84, kSecondColRight}, kDETEnabled, keProperty,
- EditText { kPalatino, 12, kDETLeft, kDETNormal };
-
- {kDETSubpageIconBottom+90, kFirstColLeft, kDETSubpageIconBottom+104, kFirstColRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "a" };
- {kDETSubpageIconBottom+86, kSecondColLeft, kDETSubpageIconBottom+104, kSecondColRight}, kDETEnabled, kaProperty,
- EditText { kPalatino, 12, kDETLeft, kDETNormal };
- };
- };
-